package cn.tedu.backend.portal.mapper;

import cn.tedu.backend.portal.model.Attractions;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AttractionsMapper extends BaseMapper<Attractions> {

    //查询所有景点
  @Select("select * from attractions")
  List<Attractions> selectAttractions();

    //根据id查询景点详情
    @Select("select * from attractions where aid=#{id}")
    List<Attractions> selectAttractionsById(int id);

//    //统计其他活动总数
//    @Select("select count(*) from activity where activity_try = 'volunter'")
//    int selectVolunteerCount();
//
//    //统计其他活动总数
//    @Select("select count(*) from activity where activity_try != 'volunter'")
//    int selectOthersCount();
}
